#![allow(dead_code)]

struct AsRefLrn {}

impl AsRefLrn {
    fn hello() {
        println!("AsRef learning!");
    }
}

#[cfg(test)]
mod tests {
    // use super::*;

    #[test]
    fn basic_asref_test() {
        fn is_hello<T: AsRef<str>>(s: T) {
            assert_eq!("hello", s.as_ref());
        }

        let s = "hello";
        is_hello(s);
        println!("{}", s);

        let s = "hello".to_string();
        is_hello(s);
        // println!("{}", s); // NOTE: s is moved
    }
}
